package com.ddd.mill.query.producttype;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ddd.mill.domain.aggregate.producttype.entity.ProductType;
import com.ddd.mill.api.product.dto.response.ProductTypeListDto;
import com.ddd.mill.infrastructure.persistent.dao.product.ProductTypeDao;
import com.ddd.mill.infrastructure.utils.TypeConvertUtils;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProductTypeQueryServiceMyBatisServiceImpl extends ServiceImpl<ProductTypeDao, ProductType> implements ProductTypeQueryService {
    @Override
    public List<ProductTypeListDto> productTypeList() {
        return TypeConvertUtils.convert(this.list(), ProductTypeListDto.class);
    }
}
